import { axios } from '@/utils/request'

/**
 * 查询类别
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryPage (parameter) {
  return axios({
    url: '/category/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 类别列表
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryList (parameter) {
  return axios({
    url: '/category/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加类别
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryAdd (parameter) {
  return axios({
    url: '/category/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑类别
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryEdit (parameter) {
  return axios({
    url: '/category/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除类别
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryDelete (parameter) {
  return axios({
    url: '/category/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 导出类别
 *
 * @author blueberry
 * @date 2021-08-25 22:25:39
 */
export function categoryExport (parameter) {
  return axios({
    url: '/category/export',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
